import { http } from '@/utils/http'

export function useChangeApplyApi() {
  return {
    // 获得变更申请
    getChangeRequest(id: string) {
      return http.get<ChangeApplyForm>('/prod-api/admin-api/project/change-request/get?id=' + id)
    },
    // 获得变更申请根据流程Id
    getCRByProcessInstanceId(processInstanceId: string) {
      return http.get<ChangeApplyForm>('/prod-api/admin-api/project/change-request/getByProcessInstanceId?processInstanceId=' + processInstanceId)
    },
    // 腾讯云获得变更申请
    getTencentChangeRequest(id: string) {
      return http.get<ChangeApplyForm>('/prod-api/admin-api/project/change-request-tx/get?id=' + id)
    },
    // 腾讯云获得变更申请根据流程Id
    getTencentCRByProcessInstanceId(processInstanceId: string) {
      return http.get<ChangeApplyForm>('/prod-api/admin-api/project/change-request-tx/getByProcessInstanceId?processInstanceId=' + processInstanceId)
    }
  }
}
